#
#makefile for planetz
#

CFLAGS = -g -O0 -Wall
LDFLAGS = -lSDL -lSDL_gfx -lSDL_ttf #-lSDL_image 

OBJECTS = debug.o Game.o Main.o mtime.o NewThing.o Player.o randInt.o Space.o Vector2.o

all: planetz

planetz : $(OBJECTS)
	g++ $(LDFLAGS) -o planetz $(OBJECTS)

clean:
	@echo "#\n# Cleaning up\n#"
	-rm *.o planetz

debug.o : debug.cpp debug.h
	g++ $(CFLAGS) -c -o debug.o debug.cpp

Game.o : Game.cpp Game.h Object.h Player.h
	g++ $(CFLAGS) -c -o Game.o Game.cpp

Main.o : Main.cpp NewThing.h
	g++ $(CFLAGS) -c -o Main.o Main.cpp

mtime.o : mtime.cpp mtime.h
	g++ $(CFLAGS) -c -o mtime.o mtime.cpp

NewThing.o : NewThing.cpp NewThing.h Game.h GameConstants.h Missile.h Player.h Space.h
	g++ $(CFLAGS) -c -o NewThing.o NewThing.cpp

Player.o : Player.cpp Player.h Object.h Vector2.h
	g++ $(CFLAGS) -c -o Player.o Player.cpp

randInt.o : randInt.cpp randInt.h
	g++ $(CFLAGS) -c -o randInt.o randInt.cpp

Space.o : Space.cpp Space.h DamageWidget.h ExplosionEffect.h Game.h Locker.h Missile.h Object.h Planet.h randInt.h Vector2.h
	g++ $(CFLAGS) -c -o Space.o Space.cpp

Vector2.o : Vector2.cpp Vector2.h
	g++ $(CFLAGS) -c -o Vector2.o Vector2.cpp

